﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using TravelAgencyDAL;
using System.Drawing;

namespace TravelAgencyHTML5
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface ITravelAgencyService
    {

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "/GetTrips/{page}")]
        IEnumerable<TripDTO> GetTrips(string page);

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "/GetImage/{imageId}")]
        Image GetImage(string imageId);

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "/GetTripDetails/{id}")]
        TripDetailsDTO GetTripDetails(string id);

        [OperationContract]
        [WebInvoke(RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        void CreateReservation(WebReservation newReservation);

        // TODO: Add your service operations here
    }


    // Use a data contract as illustrated in the sample below to add composite types to service operations.
    [DataContract]
    public class WebReservation
    {
        [DataMember]
        public int TripId { get; set; }

        [DataMember]
        public string UserName { get; set; }

        [DataMember]
        public int PeopleCount { get; set; }
    }
}
